﻿CREATE TABLE [dbo].[tbl_usercities] (
    [tbl_city_id]  INT NOT NULL,
    [tbl_Users_Id] BIGINT NOT NULL,
    CONSTRAINT [PK_tbl_usercities] PRIMARY KEY NONCLUSTERED ([tbl_city_id] ASC, [tbl_Users_Id] ASC),
    CONSTRAINT [FK_tbl_usercities_tbl_city] FOREIGN KEY ([tbl_city_id]) REFERENCES [dbo].[tbl_city] ([id]),
    CONSTRAINT [FK_tbl_usercities_tbl_Users] FOREIGN KEY ([tbl_Users_Id]) REFERENCES [dbo].[tbl_Users] ([Id])
);


GO
CREATE CLUSTERED INDEX [IX_FK_tbl_usercities_tbl_Users]
    ON [dbo].[tbl_usercities]([tbl_Users_Id] ASC);

